A Fermat principle for stationary space-times and applications to light rays