Do not set typeinfo flag 0x1 for c++ classes as it causes them to not be scanned by the gc
Remove void pointer casts so memcpy gets the right types