[perl #118525] make it work on threaded builds