wrap libsvm into C function