First-principles study of exchange interactions of NiNb2O6 and FeNb2O6