Replace Array.reduce with simpler loop.

For https://github.com/openannotation/annotator/issues/411