josh: cherry-pick upstream patch to fix build with rust 1.73
Our josh builds broke on staging with the new rustc 1.73:
https://hydra.nixos.org/build/239619692/log/tail
This commit cherry-picks the fix (already merged upstream)
https://github.com/josh-project/josh/pull/1290