Fix protobuf serde errors

Hi, 

This is a pull request trying to fix the same problem described in pull request #400,  and the fix has been tested successfully on Hive 0.12/0.13 and Protobuf 2.4.1/2.5.0.

Any comments?

Thanks
Angus