Added position independent code (-fPIC) and shared library (-shared) flags for Makefiles.