Add implementation of cvSetMemoryManager.