Fixed autobuild to include required pthread libs.