Gold futures post modest gains to end two-session skid