apply ticket#13556 patch: _rmdir was not declared in this scope (mingw)

http://trac.wxwidgets.org/ticket/13556
-fno-keep-inline-dllexport only exists in gcc >= 4.6.1
remove -l from system libraries.

This is not necessary in mingw and causes errors in msvc.