better way of determining OS type