fix possible race condition when document ready was triggered before rangy was available, happened with yepnope.js loading in IE8