Internal helper function to determine OS in a consistent way.

get_os()