Quasistationary solutions of scalar fields around accreting black holes