Fix ObjC @encode for C++ classes w/virtual bases.

PR17142.