CheckAtomic.cmake: Put all C++ code inside CHECK_CXX_SOURCE_COMPILES.