[Core] Fixed issue with PCH not working on some versions of GCC [s2077]

Since some versions of GCC doesn't output patchlevel on -dumpversion the PCH check can fail.

(based on commit [12586] - 6ebd805)