Handle problems with infinite coordinates.

Fixes issues when using d3.geo.mercator.