fixing #124 and some improvements to 3rdparty configuration

This should fix #124.

@danielru and @memmett : Could you test that on your machines?