Invariant prolongation of the Killing tensor equation