Fix library usage

Library examples from README does not work currently. There is no
"main" entry or "index.js" file in the root of the repo. Fixed by
adding "main: lib/index.js" to package.json