build-sys: fixes for non-Linux systems

Signed-off-by: Karel Zak <kzak@redhat.com>