Optionally registers as AMD module
Merge pull request #1333 from jrburke/register-amd

Optionally registers as AMD module