Macs don't have byteswap.h or endian.h. Change conditionals to only use the faster SHA-1 code on little-endian machines with byteswap.h.
This optimized implementation of the SHA1 algorithm is about 28% faster than the old one (on sapphire hardware) but assumes little-endianness. Add it, but continue using the old implementation on big-endian hardware.