Provide 2.6 transparent compatibility.

session_is_loggedinas() is deprecated for 2.6 and up. To avoid
developers getting debugging messages about that just verify if
the new method exists.
Merge pull request #1 from stronk7/moodle26comp

Provide 2.6 transparent compatibility.