QCD effective charge from the three-gluon vertex of the background-field method