Mylan turns a 2nd quarter profit compared with year-ago loss, and most sales improve