make urand() private.
Modify for 2.4.0, removed some explicit conversions, more flexible Makefile.