cli: compatibility patches for cygwin (locale setting, check for root, --console parameter)