Fix CLI selftest on Windows