Fix cross compile instructions.
Add extra #define guard, fix CMake.
Proper fix to malloc.