rosnode_ping) Fix to https://github.com/ros/ros_comm/issues/234

@dirk-thomas Please review. I'm not sure if this patch doesn't break anything else.