Add package json and support for commonjs exports

Though this currently has dependencies pointing to my forks, I can change the dependencies to match the originals if other PRs with package jsons are merged.