Fix err_hash for threaded perl