anoying problem with pthread linking