If memory serves, the ground pin is irrelevent because it still goes to ground.
The idle issue could be a few things. What year is the EJ22 from? Does it still have the external IACV like the EJ25 had? The 98 EJ22 had it, and can be swapped (manifold and all) onto it. I have a complete manifold that ran on a variety of 96-98 Impreza ECUs.