Right now you need the function passed in to be located on the window object. I'm using requirejs and its impossible to use because the objects are not located on the window.
It makes more sense to make the interface like so:
Trace.before(Array.prototype, "push", fn);