Mark internal classes as serializable.