Implemented modular GCD algorithm for univariate polynomials.