I haven’t bought into the “Jack becomes a Muslim” thing yet.
The way 24 works, his appearance had to have some significance. The writers don’t usually just throw in a prominent appearance by some previously-minor character.
More likely the Imam’s appearance was just another hook for some new twist and turn next season.
I mean here's Jack about to die and he wants to talk to someone before he goes.
Who's he gonna call...Ghost Busters???
Not like he has a whole host of candidates.
I was somewhat disappointed that they left sooooo many things with loose ends but, it is 24 and it's not like they haven't done it in the past.