add support for amd & module entry point in package.json

this pr makes this module consumable by amd module loaders