Update build.sh to use headless installation