fix #1858
fix test behavior with postgis < 2.x