fix build in linux and mac