Correctly fix the gcc version detection

Make sure that the major and minor number never be confused.

Sorry for the double patch :/
Merge pull request #234 from vlag/patch-1

Correctly fix the gcc version detection