Fix incompatibility between asio and ncurses.h due to the latter defining a macro called "timeout". Fixes #2156.