Fix random seeding in release mode