[js] don't prefix enum constructor access with $ (closes #2418)