Fix JS vars in compiler and add check for JS globals for ClassRefVar in interpreter.