const char_u *mch_getenv(const char *name)

seems to be the way to go.