[core][js] gc engine: fix syntax errors