More build script fixes