Make Mac surfaces serializable, needed for sandboxing

r? @metajack