Use C++11 <random> instead of C rand().