gdal: fix HEAD build and Mavericks specific issues