CheckCXXSymbolExists: Make C++-syntax symbols work on more compilers

On some compilers the syntax `#ifndef std::fopen` will always lead to
compilation error.  Avoid generating it in the check.
3 files changed