For the header only version, the global variable default_random no more exist => we need to replace all occurences of default_random by a call to the global function get_default_random(). As usual, no modification for the non header only version.