The Rayovac 840 uses a 3p2c (3-Positions, 2-Contacts) pin header connector, with the leads connected on the two outermost contacts. It could also be described as a 4-position connector, but there's plastic filled into one of the holes so not really.
This should work for you:
https://www.futurlec.com/Connectors/HDCONNS4.shtml
http://www.ebay.com/itm/25x-Dupont-Wire-Jumper-Pin-Header-Connector-Housing-1x4-Male-Female-/131221943350
Just be careful with the polarity. Also, be sure to get the crimps that go into it as well: http://www.ebay.com/itm/141446678863
This should work for you:
https://www.futurlec.com/Connectors/HDCONNS4.shtml
http://www.ebay.com/itm/25x-Dupont-Wire-Jumper-Pin-Header-Connector-Housing-1x4-Male-Female-/131221943350
Just be careful with the polarity. Also, be sure to get the crimps that go into it as well: http://www.ebay.com/itm/141446678863