This is a posible fix for #5655.
While running SM52 in debug mode, it triggered compartment failures. Indeed, it seems XMPP is initialised with a ScriptInterface that:
- Possibly no longer exists by the time the user changed to the lobby page
- isn't the same as the scriptInterface calling "guiPollNewMessages".
I couldn't reproduce the crash using P221 with this fix applied on SM52.