Fixed navigator.userAgent: it didn't reflect the value of userAgent setting

Closes #166