Add AMD support. Add RequireJS demo. Ref #15