Some tweaks for building the CLI on Windows. Still untested...