Observation of Z production in proton-lead collisions at LHCb