add freebsd compiler flags

fixes building on freebsd