Line broadening of HD immersed in He and H2 gas