A thermodynamic approach to nonlocal strain damage