Add htole32 replacement and proper header detection of endian.h.
Merge pull request #1983 from kacfengine/endian_h

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