osx-port: use proper #ifdef vars
osx-port: use proper compile-time platform checks