Implement \Serializable interface for lang.XPClass