Platform compatibility issues fixed in the building scripts