N-flationary magnetic fields