libstd: Pass-through PATH in test_override_env

In some operating systems (such as NixOS), `env` can only be found in
the explicitly-provided PATH, not in default places such as /bin or
/usr/bin. So we need to pass-through PATH when spawning the `env`
sub-process.

Fixes #17617