tests: Fix check for global scope pollution
Since commit c5700113 dropped the with
statement, this bit of
the test has only checked for writes to a specific variable
in the file.
There is no direct replacement for with
here, the best we can
do (I think) is comparing property names on the global objects
before and after the eval()
call.