Fixes to get libc++ building on sun solaris. Patch from C Bergstrom.