Use a more portable method of reading OS version.