gold sheds early gains as dollar rises