Add virtual destructors to fix -Wnon-virtual-dtor warnings