Merge pull request #131 from vassilevsky/osx

Enable builds on OS X
Use different before_install scripts for different OSes

Travis doesn't evaluate Bash conditions in the scope of the entire
script, so this seems to be the only way of doing this.