check if point is inside polygon javascript