Adding compability for Moodle 2.4