Fixed driver code to work with non-Windows OSes.