get_random_int changed to be windows-compliant