fix build issues on Mavericks