fix build issue on OSX