Browser compatibility

Made Pivot browser compatible if you import pivot_item.js and index.js in the browser.