I think you are out of luck gluing it to a flat surface. Most T-mould is made from poly ethylene, one of the properties of this material is that nothing sticks to it...
Before someone points out that hot melt glue works, it is not really sticking to the t-mould. The hot melt glue sticks to the timber in the groove then fills the gaps between the t-mould barbs and the groove creating a mechanical bond not a chemical bond.