Walmart profits improve as U.S. sales struggle