mod/os: simplified os detection