IE debugger fixes

Fixes two issues:

1. IE8 and below throws an error when calling indexOf on an array, so make a dust shim for it
2. IE9 and below treats console.log as an object as an object instead of a function, so add a check for that, and if it's an object, call it directly

This is patching back to 2.1.x so please double check the commit history.