Fix regression in Javascript generator for enums.