Every IOS version since 12.0 (or thereabouts) has IPsec provided you get the feature set with it.
When you're on the IOS download page (http://www.cisco.com/kobayashi/sw-center/sw-ios.shtml) select the router and version you want then get the "IPSec DES" or "IPsec 3DES" feature set, it'll have IPSec in it.
The IOS filename will have a k8 (DES) or k9 (3DES) in it if you're not sure.