Improved linux detect