Only if, any of the funds are specifically used for funding acts of terrorism. Just buying a weapon to defend their mosque or family from anyone wishing them harm could be Jihad (a religious duty of Muslims) I would imagine that only if they use the money for weapons or training or anything purchased with the funds (food, air tickets etc) in a covert way to commit acts of terrorism against the UK could this be classed as Treason, and then only treason if the UK person making the initial donation was aware of it's intended purpose. They may think they are helping people to undertake the Hajj.

But then I know nothing