fixing firefox 27 loadend event won't fire