Preliminary OSX support hack