That's good, is it running fine on FreeBSD?
I committed the changes to headers.h. For consistency, I used __BSD__. The complete list of defines is at http://docs.wxwidgets.org/stable/wx_cppconst.html
malloc.h is only needed on windows, I'll move that into the __WXMSW__ section before it causes any more trouble.