Revert to old array iteration

In order to be compatible with old versions of Internet Explorer.

```for (var i in ...)``` doesn't work on IE < 9...