Make zval2myslqnd implementations aware of inheritance