Replaced deprecated cast.hpp with polymorphic_cast.hpp. Droped dependency to the Numeric library