Automatically connect up platform-specific libs

I forgot to actually finish this before shipping the first release of the library, therefore making it pretty useless :-/ 

## TODO

- [ ] Make sure this actually works