fix linking of gdal/ogr plugins when linking to statically built gdal