Fix binary archive serialization.
Add rational serialization.