Do not use min in grid stride loop setup.

This avoids problems with min on MacOsX (see #92)