Fix issue with 1.8.7 and ree

Hi @mattsears,

`Enumerable#with_index` is not defined in rubies 1.8.7 and ree, so the tests were stopped when hitting that line.

I just fixed it by using `Enumerable#each_with_index`, then using `Enumerable#map`.

Thanks,