fix build on apple