MDL-44719 libraries: Invalid call to ajaxenabled()

A bad conflict resolution in 7eaca5a810123746cdc69bf04dc7dc32a13533bc
wiped this function from the deprecatedlib file. This patch
restores it.

But as we should not call any deprecated function in core we
also remove the its usage.