I'm not an expert in this field but I would be modeling the leg with enough of a forward bend in it to make the IK handle bend the way you want.