I had the same jet-engine-fan problem after an OWC SSD upgrade. ODD fan was going 4000rpm. I used http://exirion.net/ssdfanctrl/ and it worked instantly.
Same here. managed to get two screws in at a decent angle on one side and couldn't get the others in. Felt solid enough once I'd screwed the original ODD casing back onto the iMac.
I had removed the sensor completely. Booted up and the fan was like a jet engine - 4200rpm! I opened up the mac again to check the LCD thermal sensor cable was connected properly (as warned in Step 8). It was.
So, I simply used the spudger to peel off the felt sticky pad from and then the optical drive sensor too from the drive I'd taken out. Stuck the sensor onto the SSD using the same sticky pad, plugged it back into the original socket. Bingo. Booted up and everything was back to normal.