Constant curvature cosmological solutions in nonlocal gravity