Fix build on Mac/Win