Fix windows build

Hi! If you don't mind, I'll push all changes/fixes to your fork, since it's more completed.

These 2 commits are fix the build on Windows.