[Polygon] Fix rectangle test, failing on some platforms