Revert "Revert "Revert "Fixed compilation for VS2010/non-C++11 threading code (nullptr is not suited for those arguments are they are integral types, NOT pointers)."""

This reverts commit 01a035cf3ab03352433005a967521e125cd73969.