Optionable jQuery + close polygons for compability with PostGIS