[#858] fix for release build.  type aliasing was violated, use a union to properly handle type punning