Allow netCDF save to work with non-native byte orders.
Fixes #768.