The longtime U.S. diplomat pleaded guilty to two counts of acting as a foreign agent on behalf of the Cuban government.