fixups to get (almost) working on windows