Gold futures eke out a loss for the week