Added support for older browsers.

Older browser that do not have Array.map will get manual mapping with a
while loop.