fix ruby detect when use system libs