Behaviour of lignin during thermal treatments of wood