Fixes IE8 and IE9 errors by polyfilling .forEach() and console.log.apply