REPL: fix test that fails locally via `Pkg.test` (#57202)
Via `Base.runtests` it seems stdlibs are generally available in test
environments.
In `Pkg.test` they must be in the test env, which Profile isn't, so this
failed locally.
All REPL tests pass locally with this.