Replace OpenMP reduction on arrays with atomic updates, since it segfaults on MacOSX.