Fix libraries to link per platform

Reported in #199.
Merge pull request #202 from octokit/jspahrsummers-patch-1

Fix libraries to link per platform