Bug #948: detect thread local storage support