[tests] Support the other format of error.stack

This makes error.stack parsing work in Firefox and Opera 12-, and maybe in Safari too (didn't test).