Correctly fix the gcc version detection

Make sure that the major and minor number never be confused.

Sorry for the double patch :/