[mips] Define getTargetNode as a template function.

No intended functionality change.