Fix some parts of compilation for windows.