fix library url
add system detection for freebsd