Microwave spectra of molecules of astrophysical interest. XVIII. Formic acid