Use C++11 pseudo-random generator instead of rand().