fix build errors, mavericks