Fix two build issues on 10.5