fixed most tests on Windows with cmake, some tests fail but I don't think
this has something to do with cmake (they are just broken)