Fix memory leak introduced by interaction mode support

https://github.com/robotology/gazebo-yarp-plugins/commit/e7509012a41899671475f55a05c3d367392ab036