Fix incompatibility with jsdom 1.0.0-pre.1

Closes #513