Fixing undefined reference when compiling static build

This fixes the following error when compiling with STATIC=1:
undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2.5'