upgraded build script to be like the 1.x version.