Avoid console errors on windows e.g. when running unit tests