Heavy metals in the transmission spectrum of the ultra-hot Jupiter KELT-9 b