I checked execution of this library on Mac OS X + Xcode 2.4.1. 

In the version 0.3, default shared memory size is too small, which
causes "Invalid Argument" error at the time of shared memory
allocation.  However, this version uses mmap for shared memory
allocation, so this problem was solved.

If you want to use System V IPC shared memory, you need to increase
the size of the shared memory. For this, please modify the following
line in /etc/rc file:

sysctl -w kern.sysv.shmmax=4194304 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=1024

as 

sysctl -w kern.sysv.shmmax=67108864 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=16384

then, reboot the OS (other versions of Mac OS X might use different
configuration files).

This is a modification of system configuration file, so it is
dangerous. Please be careful and do it at your own risk.
