Port a few basic tests of global objects.

https://github.com/ariya/phantomjs/issues/12439