Fix -Wnon-virtual-dtor compiler warnings.