fix for ejabberd 2.1.x