Spectra of non-hermitian quantum spin chains describing boundary induced phase transitions