Krylov-Bogolyubov averaging of asymptotically autonomous differential equations