Do you have a remote for it? If so you should just be able to hit the unlock button after connecting the battery.

If not try getting in the car and turning the key from off to acc 5 times very quickly after connecting the battery. I would be careful about reconnecting the battery with the key in the ignition. You're more likely to have a surge and damage electronics if the key is in while connecting