Delocalization and Conductance Quantization in One-Dimensional Systems Attached to Leads