fix endian detection on MacOS