Insight into the immobilization of ionic liquids on porous carbons