Fix possible warnings.
Fix #1

Support Moodle 2.5 mode of checking session_is_loggedinas instead of \core\session\manager::is_loggedinas() (available since Moodle 2.6)