Fix build on kFreeBSD

First hunk fixes G3D not being able to identify kFreeBSD. Second hunk fixes vmapexport not knowing that all GLIBC platforms and not just traditional linuxes have the same mkdir() api.


After some discussion with the devs regarding other platforms we’ve decided that the this new patch is safer and less likely to cause build issues for cygwin/vc++/etc.