Defect model of the solid-to-smectic B phase transition