[ruby] Workaround bad symbol in libtinfo.so on FreeBSD