Keep it working in Moodle 2.4