Fix compilation on Mac and use pkgconfig to get info.
Merge pull request #18 from Typz/build

Fix compilation on Mac and use pkgconfig to get info.