A polynomial preconditioner for block tridiagonal matrices