Wrapping a C library in Python with ctypes