Port the reorganization back to OS X

Hi Dimitri,

I ported your work back to OS X and tested it in hopes that our two bases can continue to trade mods going forward. Here's a PR that should compile for both OS X and Windows.