Fixed plugin.register
Added support for a plugin to be a function, using ‘pluginName’ instead of ‘name’ as the name prop, as it’ll conflict with js specs