Gluing Lidar Signals Detected in Analog-to-Digital and Photon Counting Modes