No guarantee they are Muslims; Nigeria is about 50/50 and the Mulims have the inland half. As for Jefferson he paid off the pirates for several years before our Navy was strong enough for a fight.
It doesn't say they are Nigerian pirates, just that the sailors were kidnapped off of the Nigerian coast. Muslim or any other pirates do not observe borders. Muslim and pirate are pretty much synonymous now.