A U.S. district court on Thursday ruled in favor of generic drugmaker Mylan NV in a patent dispute over Biogen Inc’s blockbuster multiple sclerosis drug Tecfidera, sending Biogen’s shares down nearly 6%.