Make clear() support different OS's