Simulation of biochemical reactions with time-dependent rates by the rejection-based algorithm