allow lib.malloc to take the pointer directly.

 * This is useful for improved performance on loops because
   ffi.typeof() is not compiled in many cases.