Alternative fix to #149

An alternative fix to #149 - pthread linking issue