Fix Build Without X11 Deps
This was impossible for two reasons:
- Not all of the required libs were properly checked by the CMake files. This enabled the X11 features even if not all libs were present.
- The X11-less code path suffered from one regression from the port to KF5.
BUG: 402902
FIXED-IN: 19.08.0