U.S. business inventories post first gain this year