Test libraries for dynamic/static instead of testing whole executable
Rationale: some systems are missing static glibc but have static boost.  This will detect and link against static Boost on those systems.
Merge branch 'master' of https://github.com/moses-smt/mosesdecoder