Move EXTRALIBS handling to common.mak.