Change 'for..in' loop to for loop.

The 'for..in' loop caused problems when the array was extended with
more methods (like map), e.g. by html5shiv in old IEs.