Work around "Input/output error" opening /dev/ttyS0

E.g. http://hydra.nixos.org/build/5541847

This is a random occurence, maybe due to a race with something else.
So just retry until it works.