fix for ejabberd 2.1.x
Merge pull request #1 from blackbass1988/v2.1.x

fix for ejabberd 2.1.x