fix endianness checks

These were defaulting to big endian when not defined.

Reported by Philippe Groarke.
Merge pull request #19 from tmatth/endian

fix endianness checks