Fix coverage tests on MacOS