TUI narrows quarterly loss despite geopolitical headwinds.