Bud weakens to a tropical storm off Mexico's coast