Adapt to rand changes

Fixes build with rust master