Neutron yield from carbon, light- and heavy-water thick targets irradiated by 40 MeV deuterons