Another take at making compatible node/browser library...not sure why I wasn't getting these errors earlier