Add failing test for using namespace function with AMD
add extractGlobalNamespace to fix #108