Upstream had ticket and patch available since 2017, still unmerged and refuses to support the environment variable, so patch it in. This also strips out the variable for test execution to work around buggy test suites like glib.
Signed-off-by: Ophestra <cat@gensokyo.uk>