Fix debug function in IE9