Remove c++ dependency and fix versioned libs