Add htole32 replacement and proper header detection of endian.h.