This requires GEOS >= 3.3.0 to function properly. On previous versions, the Z dimension will simply not appear in the wkt. Disabled OpenLayers editing for 3D geometries (unsupported).
This is easier to track changes through the VCS.