fixed flawed prefix detection (Firefox 18 was broken). fixes #118