build: improve build

* on FreeBSD systems lib and libdata directory differs
* rename INSTALL_LIBRARY to INSTALL_LIB, see details in
  http://www.freebsd.org/doc/en/books/porters-handbook/install.html

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
port FreeBSD commit over
build: simplify

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
build: added DragonFly BSD

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>