Interplay of boundary states of graphene nanoribbons with a Kondo impurity