Fix linking errors on Windows. Fix gitignore for Windows