Accelerating cosmologies from non-local higher-derivative gravity