Fixed https://github.com/tmpvar/jsdom/issues/576