Fix endian detection for platforms that do not define __BYTE_ORDER