Fixed compile errors under llvm-gcc-4.2 (OSX 10.8)