Added the flag -fPIC to compile the library object properly