added patches for build scripts