Better linking through libgit2 in node-gyp.

This adds in a similar binding.gyp configuration for libgit2 as found
in:

https://github.com/atom/git-utils

I've had to modify it to work with our older version of libgit2, but
this will all be templated soon.