Make Mac surfaces serializable.

This is needed for sandboxing.