OSXify

Just a few tweaks to get this working in OSX