Convert dynamic_cast to static_cast in CRTP Search