Fix access of size_t as int
Fix wrong initialization

The memset got the sizeof the pointer instead of the size of the struct.
A newer GCC caught this in a warning. Thanks!
Switch to ninja-build from redo