Fix segmentation fault in gcc10 i686 in test code.
Tested by me and reporter in their build system in https://github.com/xiph/opus/issues/215
It does not happen on O1 so GCC10 have some optimization on I686 that causing segmentation fault based on the previous code.
The change do the cast on the rand and then downcast it afterwards.
I am not curious enough to start looking at assembler and track bugs in GCC if there would be one.