That's strange. '99 head and IM flows way better than the '97. Is this somebody elses project that you bought? Assume you're running the '99 OEM ECU with bandaids for the turbo? Maybe that's why the car has a '97 engine (the '99 engine was blown)?
My recommendations:
1. '99 head, intake manifold and sensors so that the '99 wiring harness works. Plus, you'll have more power. Note that the exhaust side is the same for both engines, so you won't have to modify turbo manifold/downpipe.
2. Standalone ECU so that your engine has a prayer of lasting more than 2 months.
3. Join miataturbo.net.