Fix dependency on protobuf

Closes #1272
Review 813 by @neumino