How to prevent over-charging a battery?
Charging NiMH batteries is usually done using the so-called Delta-V charging method. There are ready-made ICs for that (LTC4010, MAX713, etc.) but probably they won't work with the power coming directly from that solar cell.

Basically there is no simpler reliable charging method for NiMH, though in some applications it's possible to charge an NiMH battery with a constant and very low current (&lt; 0.1C). The battery won't blow up but it will not reach its specified cycle count either.