Some fixes of the build scripts.