Clone of goprotobuf from https://code.google.com/p/goprotobuf/