Build: fix lib build for older systems
Return a python object instead of a ctype structure