Fixes for PostGIS 1.5; factor out a few more common methods