Fix a timing problem in the unit tests that occurs in IE < 9.