This ensures that `leanc` understands cc-wrapper vars such as `NIX_LDFLAGS`
Also adapt the patchelf patch from rustup, since Lean 4 now dynamically links to gmp.