Revert "Drop os detection"

This reverts commit 7a412aa749f6f2a79e0bf0836e0c45b60b1905cc.