QED corrections to hadronic processes in lattice QCD