add AMD support
Merge pull request #1 from hellocreep/master

add AMD support