[master 1/1] Keep libthread so that gdb will work correctly (#1269055)