changed shared_dynamic_cast to dynamic_pointer_cast

shared_dynamic_cast was deprecated in boost 1.35 and has been removed in boost 1.53