Dozens killed in battles with Somali rebels