Add support for extendScope in AMD modules

Looks like extendScope support was only added for global modules.  Adding support for AMD modules as well.