os x compatable again

@momo-the-monster can you double check that I didn't break any of your windows changes?  thanks