support GCC 4.6 by conditionally using final and override