Fix issue with strange constants under OSX.

Receiving strange constant nodes before the real tree
under OSX 10.8. Not so under Ubuntu 12.04.
Fix regressions in Javascript example configuration.
Added a comment.