fixing setting the locale back to what should be expected

Like discussed in http://code.opencv.org/issues/927 this bug was fixed for normal windows using the gtk interface. However I experienced similar problems using windows with Qt enabled.

Applied the fix suggest by Qt itself. Hopefully it builds perfectly without errors, as it works here applying that trick.