An Algorithm for Finding Weakly Reversible Deficiency Zero Realizations of Polynomial Dynamical Systems