i actually built a circuit for this kind of thing... we had a 36V actuator driven by three 12V batteries in series, but only a 12V charger to charge them back up. I accomplished it using a DPDT relay and some diodes ( i think 6 or 7... it's been awhile) In essence, the relay "rewired" the circuit for series or parallel operation whenever it sensed the 12V charging current. The diodes simply served to prevent the batteries from shorting out against eachother in either mode.
If you're familiar with how all that stuff works, you should be able to piece it together and just use a 12V alternator. If not, just let me know and I'll dig it up and post what i did.