Write our own implicit rule in library/Makefile.

The default implicit rule doesn't use -fPIC when it make .o file. This make linking it together in shared library not possible in some architecture (eg. x86_64).