Fix failing unit tests on Windows, enable unit tests in AppVeyor