Fixed platform related build issues