added code to detect system OS due to issue that appears only on Firefox on Ubuntu x86(maybe x64 too)