Backwards compatibility - MoodleQuickForm::setExpanded() is not defined in early Moodle versions.