math/linbox: fix build on armv7
- add missing casts in RNG initialisation
- import an upstream patch to avoid unaligned memory access
PR: 265483
Reported by: Robert Clausecker <fuz (at) fuz.su>
(cherry picked from commit 5ce6a5a14720989cb67a86be605d174db4308dfb)