[MSAFD] Properly define SockAsyncThread() and avoid the cast. CORE-11799 (#94)