Did not have a look at the code yet, but should it be possible to replace envvars usage by some keys in the registry on windows platform and/or %userprofile%/config-file ?
Anyway, my opinion on the patch is that there is no real interest for "generic/self-expanding" config file , and it is even dangerous :
I would not trust stunnel if, at run time, its config could be modified by USER envvars...