Properly close polygon rings when making conversions.

Fix #9