support globals and named amd