fix build error on mac