Revert most of 16d810f9c1cede017d9c522f957274c1f67c2ebc to avoid crashing on
startup with log4cplus as static library.