Kodak announces second-quarter earnings, will divest its flexographic division