Thread safe swig implementation of libsvm bindings to perl