Replace SetNamedPipeHandleState patch with proper implementation.