Hudbay agrees to sell Guatemalan nickel mine for $170m