Floods kill 45 in South Africa, damage infrastructure, official says