freebsd: Fixes for the compilation of libosmocore on FreeBSD

alloca.h is not available on FreeBSD, use the default autoconf
function to check for it, there is a complete list[1] of what to
do for using alloca but let us see how far we get with this test.

Include netinet/in.h for the IPv4 and IPv6 socket address. Check
for dlopen in libraries and use this instead of linking -dl.

[1] http://www.gnu.org/s/hello/manual/autoconf/Particular-Functions.html
diff --git a/src/conv.c b/src/conv.c
index f47d75c..0416d27 100644
--- a/src/conv.c
+++ b/src/conv.c
@@ -29,8 +29,10 @@
 /*! \file conv.c
  *  \file Osmocom convolutional encoder and decoder
  */
-
+#include "config.h"
+#ifdef HAVE_ALLOCA_H
 #include <alloca.h>
+#endif
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>