Thread: try to avoid compile error with msvc.12.

[SVN r86542]
Thread: try to avoid compile error with msvc.12 or atleast remove warning C4512.

[SVN r86543]