build: fix build on SmartOS

On Solaris based OSes, cfmakeraw is not available. On these platforms,
manually set the terminal in raw mode instead of using cfmakeraw.