Added AMD/CommonJS wrapper for plugin