When patching the define callback, maintain the arity of the callback

This lets patchDefine work with modules like backbone.projections that
manage their own dependencies in a require-like fashion.

Formatting auto-triggered, making this commit a bit noisy.
build the agent code before running tests