fixed bug in largest rectangle when polygon is singular (has regions of zero height or width)