Factor out OS detection in vimrc