[js] constants - support 'int val' constants with no actual object