Prototype-friendly multiple dispatch for JavaScript.