If you only need a single random number, you might be able to use a uniform and then pass the random number through GDScript/C#. It is not ideal, but it might work in a pinch.
Another interesting solution to generating random numbers could be using something like the random
function provided in the "2D Random" section of this page from the BookOfShaders.com. If I recall correctly, the shader shown works in Godot with a little modifying, though I found passing the Vector2 to get the number difficult. It might be worth looking into if you have a way to generate Vector2 coordinates.
It is strange that randf_range
is not defined. I'll keep an eye out for other solutions and if I find any, I'll post them here.