It's not possible to get accurate torques when using a u-joint. If there's any angle at all on the u-joint, the torque reading will not reflect the actual torque.
A better approach would be to use a crowsfoot installed at a right angle to the torque wrench if it's not possible to get the torque wrench on the bolt with a socket on it.
With a little mathematics you could use an extender in line with the wrench stem.