Windows build fixes.
Merged pull request #608