Tweak some build issues for mac