Reroll: Add Guard for invalid readyState in IE9 and IE10

Rerolled the changes done in https://github.com/ded/domready/pull/17

Also helps fix issue in drupal with issue https://drupal.org/node/2004098