Improved OS Detection