[1.7.x] Silenced PostGIS deprecation warnings.

Backport of a6fc1859 from master