You may want to try this: http://pasteall.org/384523/python
It's an addon. You'll have to put it in your %appdata%\Blender Foundation\Blender\2.78\scripts\addons
folder or the equivalent in your platform and enable it in Blender. It adds a button to the constraints panel for each IK constraint it finds. The button puts the right number in the pole angle box.
I took @jerryno's solution and coded an addon around it, so, thank him. It's not the most elegant solution around, but it did the trick for my pipeline.