fix badly detected browser environment