Don't add an extra comma at the end of the enum in generated file

Thanks to Stephen McCamant for this