better fix for "Page reload detected during async script" errors
getElementsByClassName => querySelectorAll to support IE8