porting engine core to Mac OSX