Fix build with YARP_NO_DEPRECATED=ON