fix transpilation order for AMD

* requirejs complains about module not found
  if not defined before its usage
Merge pull request #36 from ashwinr/master

Fix transpilation order for AMD