Fixes for Internet Explorer 9

This fixes a couple of syntax errors, and makes all calls to console conditional (this was causing breakages on one version of IE I tried). This allows most of the site (except channel viewer) to work correctly in IE9.

I've also changed how scripts are executed slightly, in the hope that this might fix the channel viewer (I used the same approach as jQuery). However, it looks like there may be some cross-domain request issue with the channel viewer which only shows up on IE9.

I get an error from the repo.listBranches() method (I figured this out by running the channel viewer PHP script on its own):

```
SCRIPT5: Access is denied

99-Channels-Viewer.php, line 464 character 5
```

This might be resolved by using the non-standard XDomainRequest object available in that browser to work around it.

Fixes https://crosswalk-project.org/jira/browse/XWALK-918