Export: Properly disable resource preview thread
Created by: akien-mga
Fixes #26857 (closed). Fixes #34433 (closed). Fixes #34826 (closed).
Tested as working fine with p=x11 tools=yes
and p=server tools=yes
. Should also fix the bug for macOS and Windows tool builds.