Detect win32 or pthread model in a mingw gcc build.

This commit allows VTK to be built either with win32 or pthread threads
based on what thread model the compiler was build for.

Change-Id: I46f22f900c837e4ad26be478730c888ebc86822b
Merge topic 'fix-mingw482qt532-build' into master

ecbf79e7 Detect win32 or pthread model in a mingw gcc build.