Fixing messagery javascript.

Fixes Claroline/claroline#477