Fix compilations for macos mountain lion

Protobuf does not compile on MacOs Mountain lion anymore. 

The changes fixes this issue. I could not test with older versions of MacOS so i cannot guarantee it works for those