NiMH batteries don't stand up well under trickle charging currents that a NiCd battery of the same capacity will tolerate. In older pre-ROHS equipment, either replace like-for-like (i.e. same chemistry and a close match for capacity) or if you put in a battery holder and expect to use modern 'consumer' NiMH cells, expect to have to faff around modding the charging circuit to get the trickle charge current in the much narrower NiMH 'sweet spot' between death by over-charging, and failure to keep up with the self-discharge.
If you do fit a replacement in-situ on the PCB, its worth protecting the PCB under the battery with Kapton tape, with minimum diameter holes for its pins, sealed with a dab of lacquer after soldering, to protect the PCB against electrolyte leakage. It wont help if it spews its guts, but if it develops a slightly leaky seal and the typical furry positive terminal, odds are the tape will prevent board damage.