Fix logging failure in IE<9