Compile as a shared lib and remove uneeded -pthread ¬¬