CMake: Use check_symbol_exists instead of check_cxx_symbol_exists.