Use WORDS_BIGENDIAN correctly.

On Mac OS X universal builds we can't rely on WORDS_LITTLEENDIAN.
So use a different mechanism to ensure WORDS_BIGENDIAN is set.
Undo my endianness fix before merging upstream's.

This reverts commit c6c0cfc9d641ba11c2532d434e4d2bb9cfa10ef9.
Merge in endianness fix from upstream.