more generic solution with support for non-RequireJS environments
Merge branch 'upstream'