Fix a strict-aliasing with type-punning

Fixes #880
Merge pull request #890 from brunoqc/880

Fix a strict-aliasing with type-punning