From http://stackoverflow.com/questions/20100681/migration-from-simple-module-pattern-to-requirejs-amd