gold futures close near $334 an ounce