Adds endianness detection