winpr-env: fix in GetEnvironmentVariableEBA

* also fix cases where the provided env block is NULL