Avoid console errors on windows e.g. when running unit tests
Merge pull request #198 from andig/fix-debug

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