Merge pull request #27 from wagnert/master

Bugfixes for Windows build