Add index.js to allow to be used as an library.