Adds endian support for Mac OSX