(Js) generate __empty_constructs__ for enums and use that in Type.allEnums (closes #2775)