Wrap the plugin method in a closure

Protects $ alias, prevent missing semi-colons breaking the plugin when joining files for production. Uses AMD if available.