Fix browser prefix detection

This fixes #1203.