Could you wrap this with:

    if (PlatformDependent.canEnableTcpNoDelayByDefault()) { .. }