Check if we have config.h before including it

The config.h header is generated by Automake, but that can be turned off
in favor of passing the content as compiler flags. It is therefore
necessary to check if HAVE_CONFIG_H is defined before config.h is
included. Check for it before including the header.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>