sha1: make LITTLE_ENDIAN detection more robust.

On some systems, endian.h is included from some of the other include
files in sha1.h, and defines both LITTLE_ENDIAN, BIG_ENDIAN and BYTE_ORDER.
We need to check BYTE_ORDER instead on these systems to actually find the
correct endianness. If BYTE_ORDER is not defined, assume LITTLE_ENDIAN.