Effect of the attachment of ferromagnetic contacts on the conductivity and giant magnetoresistance of graphene nanoribbons