fix endian and 64-bit detection