Change some GDAL_DS locks for global locks.