how does thyroid affect liver function