if a class containing a macro is defined through Context.defineType add it to the macro context as well (closes #1497)