add package.json main entry
fix btoa for node.js