Move variable outside of GDAL guard

If building w/o GDAL, compile failed without this fix. Will be tested when #372 is merged.