fix a fatal bug in v0.8.0

npm test works fine with this patch.

related: https://github.com/tmpvar/jsdom/issues/659