fix regression for degenerated polygon (refs #129)
fix build on windows