[Core] fix using USE_QT5 and HAVE_X11