Build fix for GCC 4.2. Cast via a union to avoid strict-aliasing issues.