Fix OGR output to make it work with KML, GPX (#4776)