Fix build ldflags for freebsd