Fixed an issue building with netcdf-4 disabled.