make g++ (>= 4.7) happy

Resolve aliasing "conflict" with memcpy (and cast to void*).
make g++ (>=4.7) happy with rapidjson