platform ifdef fix for Mac