Influence of zigzag edges on the Ruderman-Kittel-Kasuya-Yosida interaction between magnetic impurities in graphene nanoribbons