fix OpenMP detection on Mac OS broken by a6fee0b

Compiler version check was done before the version got detected. This
code will avoid false positives even if the compiler version is not
available (although for GNUCC it should always be).

Change-Id: I554f13e4b101ae7c9f70674e966065bf9fcf2b27
Merge "fix OpenMP detection on Mac OS broken by a6fee0b" into release-4-6