fix build error for mac