Fix compile errors for windows (but not linker errors yet)