Fix a stacktrace on Windows with pkg.installed and test=True. The `pkg.list_repo_pkgs` function does not exist on Windows. This uses the `pkg.list_available` function instead for Windows.