MDL-61234 tool_usertours: Wrap library calls in pendingjs