Compile the library with -f*-sections flags

The -fdata-sections and -ffunction-sections flags make it possible for
the linker to remove unused functions with the --gc-sections flag