Add support for extendScope in AMD modules