Compatibility changes for Linux

These are a few small Makefile changes to correct missing lib dependencies, especially pthread.