For D, this fixes a segfault in SWIG. Java, C#, D, Go now produce code that compiles, although the definition of the enum is needed in order to use the enum properly from the target language.