Use static_cast instead of dynamic_cast. The IBM compiler returns a NULL
pointer.