Fixed an issue when using netcdf to compile with pnetcdf support.