Provide a fast alternative to dynamic_cast with C++11