Fix: the C functions should be 'foreign import ccall unsafe'