The Riesz potential in generalized Orlicz spaces