Added pthread lib for Ubuntu 14.04.