Moves include of config.h more to the top

This moves the include of `config.h` more to the top because otherwise
`HAVE_ARPA_NAMESER_COMPAT_H` is not shown.

This fixes issues on OS X (10.9).