Some hacks to make it work on Windows.