RHEL (CentOS) 5 compilation fixes

The following fixes enable build on CentOS 5

The snappy_compat.h could possibly be fixed in a more isolated fashion?