Fix for #644 jsdom.env's error back does not work properly

Second try at a PR for https://github.com/tmpvar/jsdom/issues/644. This time it should merge cleanly.