Fix a possible double-deletion in embind when returning a smart pointer from an abstract class implementation.