Fix linker flags with clang, close #5820

  1. Use --{start,end}-group to avoid object linking order probrem.
  2. Use -Wl,-B{static,dynamic} to treat static library correctly.

  see also: https://svn.boost.org/trac/boost/ticket/5820