fix ld scripts in freebsd
Merge pull request #328 from tduehr/freebsd_fix

Fix library loading on FreeBSD systems