Adapt to rand changes

Fixed build with rust master