Update perfbar.js

Update ```window``` deprecation to ```navigator```