make sure we pass along correct pthread library definitions.