uClibc: make res_init() thread safe