lib: fix API for external random
1.0.4