Fix segfault introduced by previous commit

When the workaround was active, the mod pointer was always taken from
the global variable, which was not used when called from other otrl_
functions.