[PATCH openEuler-1.0-LTS 4/4] tools build: Check if gettid() is available before providing helper