Two possibilities here, maybe more:
Wrong compressor installed -- the diesel isn't the same one as the gasser, so the speed sensor signal is wrong. I've heard of this before, major PITA.
Speed sensor producing the wrong signal due to being too far from the crankshaft of compressor -- this won't be fixed by replacing the sensor, the crankshaft isn't isntalled properly (bad rebuild, untested).
You need to check the part number of the compressor and veriy that it is correct, and it if is, the rebuilder needs to send you a tested known good one in exchange for the bad sensor equiped one.
You could also have a bad connection at the sensor harness -- pull it apart and check for corrosion or dirt.
1972 220D ?? miles
1988 300E 200,012
1987 300D Turbo killed 9/25/07, 275,000 miles
1985 Volvo 740 GLE Turobodiesel 218,000
1972 280 SE 4.5 165, 000 - It runs!