Fix build error and warnings in Fedora 18.

BUG=None
TEST=Manual

Review URL: https://codereview.appspot.com/7531047