Fix JavaScript enum template / macros