fix build error in mac