Added component.json
Modified main script to use UMD

Searches for AMD, then CommonJS and falls back to using globals. Used the approach
recommended for jQuery plugins