Effect of NiO spin orientation on the magnetic anisotropy of the Fe film in epitaxially grown Fe/NiO/Ag(001) and Fe/NiO/MgO(001)