fix broken debug() function for IE (again!!)