Fix Windows build; Misc changes
Fix wine32/64 build