Conditions for thermally induced all-optical switching in ferrimagnetic alloys: Modeling of TbCo