Cancellation of renormalon ambiguities in the heavy quark effective theory