Use "#if" instead of "#ifdef" to check conditions HAVE_... given in config.h

Even if a declaration checked in configure is not found, configure defines
HAVE_... as 0.  So #ifdef HAVE_ can be true.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>