This patch refactors the runtime support for GET_ENVIRONMENT_VARIABLE
to have a single entry point instead of 2. It also updates lowering
accordingly.
This makes it easier to handle dynamically optional arguments.
See also https://reviews.llvm.org/D118777