Change the endianess conversion for binary data from a library issue to a compiler issue.

This removes dependency to beXXtoh() functions and ensures aligned memory access.