Roger Federer wasn’t at his best, but fought hard to claim his third victory at the Nitto ATP World Tour Finals in London as he defeated Marin Cilic in three sets.