add endian conversions for short on osx.