US baker Flowers Foods recorded an increase in earnings in the first quarter driven by gains from a recent acquisition.