configure: add ACX_HEADER_ENDIAN macro

Add and use ACX_HEADER_ENDIAN macro to find the appropriate
endian.h.