OS detection for linux and OS X