Performance of the LHCb muon system with cosmic rays