Emit macros as properly namespaced functions in compiled JS