Add support for downcasting via static_cast.