Anthony Stokes got Celtic out of jail as his late strike snatched a 2-1 victory over Ross County at Celtic Park.