Performance of the CMS drift tube chambers with cosmic rays