build.sh fix for newer versions of gcc