Free energy of imperfect nucleic acid helices: I. The bulge defect