Fix aliasing violations

... and build with GCC 4.8 with strict C++ 11

Change-Id: I9bb56c676e983f039617c754550a730fd37c40bf