Exporting armatures for Unity 3d

I have exported armatures for Unity 3d for several years now, and they work great with custom animations. But if you want to take the existing armature and use Unity’s humanoid settings the armature distorts and doesn’t work correctly. This is mostly because if you have ik constraints in Blender they will export as very strangley positioned bones.

Is there a way or workflow to use ik constraints in Blender for animation purposes, but when you export to unity it doesn’t make a weird armature hierchy? What I am being forced to do is basically make two different armatures. One with custom animations, and then one with no ik constraints and no animations to be used with unity’s custom animations and ik system. I am thinking there just has to be an easier way.