Change to using randexp (#9144), add Compat.jl dependency.

This should get the package working on 0.4 again.