gold futures end higher to snap 7-session losing streak