Tweak version detection for GCC