Analysis of the sign reversal of the second-order molecular polarizability in polymethineimine chains