fixed the build script according to input from Gilles Fillipini and Clark Rawlins