made compatible with old gdal < 1.9.x