Added platform-independent endianness resolution.