Fix for the weird HPUX linker

This patch is not nice but it fixes the problem.
The issue appears because the HPUX linker tries to find
the symbol "DEBUG" in the libdb.a library. This library is
a static library of the old school, with tables for each
object file that provides symbols.
On that table there is no definition for the symbol in question,
therefore at linking time the process will fail. This commit
conditionally adds the symbol, but only when compiling the
unit test.