kleopatra: Replace some GNUC checks with GLIBCXX ones.
The checks are around code specific to libstdc++, so use a stricter
check since compilers such as clang also define GNUC, and the build
fails if another standard C++ library is used (such as libc++).