Only check gcc version with more rececnt CMake that provides compiler version varialble.

Maybe not so useful becasue more recent CMake probably also means more recent gcc.