Use autoconf-based endian detection

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>