Endianness & alignment fixes from testing on a Sparc32.