rtld: rework how environment variables are named
(cherry picked from commit 451dc2b7cc0c845a3f76f9ee670f16699c49b491)