fix build error for Mac