initial commit
added FreeBSD support
and one more FreeBSD related fix, now in getshlib.c

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>