Perturbation of joint diagonalizers