Fixing static linking for Windows