fix compile error on powerpc, sparc and s390
half way protobuf detection
protobuf fixes