fixes for GEOS-5482 backporting
Merge pull request #25 from mbarto/geos5482

fixes for GEOS-5482 backporting