Fixed a bunch of errors reported after specifying -stdlib=libc++.