Improve libtsm installation

Also attempt to install on darwin
Merge pull request #143 from clkao/master

Improve libtsm installation