Klarna said it made an adjusted operating profit in the first half of 2024, swinging into the black as the firm nears a hotly anticipated IPO.