Gamma rays from the capture of fast neutrons in Ta, W, Au, Hg and Pb