CMake: Replace CMAKE_COMPILER_IS_GNUCC with CMAKE_C_COMPILER_ID
CMAKE_COMPILER_IS_GNUCC is obsolete variable and can be replaced with
CMAKE_C_COMPILER_ID (also available since early CMake versions).
In the past CMake versions also LCC and QCC compilers had this varible
set to boolean true but these aren't relevant here.
(cherry picked from commit 25aa1c643f53bc3f1901d1725e48c7d054c40053)