Fixed #21930 -- Only import add_srs_entry if GDAL is installed

Fixed regression introduced by fabc678f93. Thanks Michael Manfre
for the report.