Bugfixes for Windows build
Merge pull request #27 from wagnert/master

Bugfixes for Windows build