configure, meson: move C++ compiler detection to meson.build