Merge pull request #12 from pw374/master

javascript: make it easier to use "outside" // core: fix generation of constant constructors in variant types