gold futures end near flat, holding above $1,240