Fixed compilation errors under clang 3.5 (mac os x)