added host endianness for OSX