Fix browser prefix detection

This fixes PR #1203.