Tests for cointegration with structural breaks based on subsamples