Heterogeneous reactions of SO2 and NO2 on carbonaceous surfaces