Actually that problem is some of the best environmental news of late. When the batteries are no longer suitable for cars they still hold tremendous value for renewable energy, and since the cost of the battery has already been covered by the car purchase it will serve to subsidize the cost of energy.
Also, the battery is not part of the car in the same sense as other car parts, since they are designed to be quickly swaped at charging stations to speed up 'refuel' times, so the car owner isn't responsible for it's replacement cost in the way you're implying.