test: Fix a test that fails when cross compiling

Hopefully unblocks a snapshot
auto merge of #17755 : alexcrichton/rust/unblock-snapshot, r=eddyb

Hopefully unblocks a snapshot