Adapt AMD API with RequireJS