ImageJ has changed the way how it represents a line as a polygon.
Instead of 2 points it now has 4 points, the first two and the last
two being equal respectively.

I expect this workaround to be somewhat robust to future changes.