Gold set for 1st weekly loss since May