Fixed PostGIS version detection

This lead to incompatibilties with PostGIS  2.x and the SQLFeatureStore.