PostGIS compatibility fix