Issue 6652: Tweak library to use Underscore.js