C++: Fix compilation with C++<11

and MSVC that disallows override on dtor

Change-Id: I8a8897fe1318dee0c6d9b4d5d9d515e4631f9318
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>