Fix Alias Bug

Use memcpy to do type punning instead of a cast.  A cast or similar
operation through a union breaks strict aliasing rules.