Build only lib from package

Fixes #724
auto merge of #839 : vhbit/cargo/lib-only, r=alexcrichton

Fixes #724
Merge remote-tracking branch 'upstream/master'