Comparative study of the second-order optical properties of spiroconjugated compounds versus the corresponding polyenes and polyphenylenes