add endianness conversion for _WIN32 and _WIN64