ASTInterpreter variable nodes: check for JS globals

This is a fix for #654.