Fix: Backward compatibility with Moodle 2.0 and textlib