Check whether HAVE_CONFIG_H is defined before we try using the
HAVE_BOOST_* macros in test/test.cpp.