Fixed build.sh to correctly check gcc version.