Dynamic message-passing approach for kinetic spin models with reversible dynamics.