Mingw fixes

Fixes for missing `ssize_t` and `WINVER` not being specified on when compiling with MinGW.

Fixes #177