Adding global variable to store a reference to the plugin instance in JS