Gold heads for second weekly loss