Use cross-platform method for terminal width
Support backslash on Windows