A Livsic type theorem for germs of analytic diffeomorphisms