[geometry] Fix for integer-distance-point-to-polygon,
submitted by Menelaos Karavelas