Thermo Fisher posts 2Q beat as life sciences segment outperforms