Define some macros for accessing shorts and ints in an endian independent manner.