Amid challenges, Fortune Brands posts sales gains