add some ugly byte swapping cruft in endian.h