allow to specify LIBDIR, BINDIR and PKGDIR at configuration time

Closes #31