Add support for Asynchronous Module Definition (AMD) API

See http://requirejs.org/docs/whyamd.html
Merge pull request #274 from sapienlab/master

Add support for Asynchronous Module Definition (AMD) API