Resolve AMD and CommonJS dependencies on load