Issue #2: re-add -pthread link flag