Generating shapefile with OGR C API