Windows fixes

I propose some fixes to the Windows files.
I got the compiler warnings using MinGW on Debian