To install unbuffer in OSX
unbuffer is part of the expect package:

brew install homebrew/dupes/expect


You may need to:

brew tap homebrew/dupes/expect


Before you can install it. 

UPDATE: As of 2018 expect is available without prefix in homebrew, thus:

brew install expect


is all that is necessary.