Fix configuration of CTKConfig based on DCMTK_HAVE_CONFIG_H_OPTIONAL value

This fixes the logic introduced by commit a32f524. Since the variable
is set to TRUE or FALSE only when DCMTK is looked up without using
DCMTKConfig, in case CTK is build against a version of DCMTK providing
DCMTKConfig, we need to also check if it is defined.

See #413
Merge branch '413-associated-dcmtk-definitions-to-ctkdicomcore'

* 413-associated-dcmtk-definitions-to-ctkdicomcore:
  Fix configuration of CTKConfig based on DCMTK_HAVE_CONFIG_H_OPTIONAL value