build.sh: add support for GCC versions > 5.4.0