build: support linking against system libs

Signed-off-by: Pawel Dziepak <pdziepak@quarnos.org>
tools/frofs: code overhaul, changed style, more boost

Signed-off-by: Pawel Dziepak <pdziepak@quarnos.org>