Generate enum constants in JS

So if the header contains:

    enum { A, B, C, D };

The generated JavaScript will have the following definitions:

    // m is an instance of Module
    m.A == 0
    m.B == 1
    m.C == 2
    m.D == 3