Fix #296: fix static links on windows