Changed shared_dynamic_cast to dynamic_pointer_cast because shared_dynamic_cast has been deprecated for some time and finally removed from boost starting in 1.53