Make a function to detect OS.