Randomize retry intervals, fixes #847 (lib)