Fix configure and compilation errors when building liboil

Use AC_CONFIG_HEADERS macro (instead of AM_CONFIG_HEADER) to allow
configuring, and add -fheinous-gnu-extensions to CFLAGS to avoid
getting a compilation error in amd64/wavelet.c when using Xcode 5.