Fix build with libkipi 5.0
The case/names of the CMake variables were being used instead of the preprocessor names, which meant the checks did not work.