Get the terminal window size on macOS
Simpler implementation: https://github.com/sindresorhus/macos-term-size/commit/60699859b17b8b7612e66edde37e9800dc27dcdb