Fix unit tests on Mac