Fix repository instantiation on Moodle 2.3