UMD wrapper support

Replaced jQuery to $'s inside wrapping function, because jQuery will be passed as $ to it.