[2.2] Add support for platforms that don't allow unaligned memory access

Maybe rename nativeByteOrder slightly, since it is actually native of Java and not native of hardware that is meant here. Perhaps usesJavaByteOrder?