Use BSD raw mode on darwin. Fixes nano, tmux and others

Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
Merge pull request #4648 from creack/fix_raw_mode_darwin

Use BSD raw mode on darwin. Fixes nano, tmux and others