GEOS-5826 backport to 2.3.x
Merge pull request #258 from mbarto/geos_5826_23x

GEOS-5826 backport to 2.3.x