SPSite.UserDefinedWorkflowsEnabled property
SharePoint 2013
Gets or sets a Boolean value that indicates whether user-defined workflows are enabled.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)