JS for IE8: failsafe console handling & others

It's quite tricky to get this working. Still not perfect, but works
as expected. Also added Function.bind and Array.indexOf - absence of
both used to cause JS errors.

refs #6417