Fixed errors in deprecatedlib.php
Check that the function exists rather than relying on the Moodle version
Merge branch 'MOODLE_25_STABLE' into MOODLE_25_BFC