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.
Totally, I did some last-minute refactoring that made it generic without updating the name