If I define a wrapper function around the existing library function and call that (the wrapper) from perl, it seems to work.
According to Inline::C's documentation there is an AUTOWRAP mode, which would alleviate the need for those wrapper functions, but I couldn't make it work so far.