Update lib.js

Сorrections for uses window.navigator - into other areas of visibility.