Length dependence of the second‐order optical nonlinearity in conjugated hydrocarbons