A strategy for walk-run transitions at constant speeds