Fix build in packaging systems like portage or debian

We now allow custom LIBS, LDFLAGS settings akin to custom CFLAGS
environment settings by using SYS_* for our overridable internal flags.

Pointed out by Guillaume BINET, solution proposed by Stanisław Halik.