use the compiler version provided by CMake >=2.8.9

With CMake <2.8.9 we still use our slightly naive compiler version
detection code, but from 2.8.9 CMake provides a compiler version
variable which should be more robust and portable, so we will use that
instead.

Change-Id: I3cefa227c4962d9a2fae06af2c5b2a0d22ef30c4
Merge "use the compiler version provided by CMake >=2.8.9" into release-4-6