cannot link to dynamic library correctly during parallel build

Already posted here.