configure.in: LDFLAGS and DLDFLAGS for opt-dir

* configure.in: reset LDFLAGS and DLDFLAGS for opt-dir again after
  LIBPATHFLAG and RPATHFLAG are set.  [ruby-dev:47868] [Bug #9317]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e