fixes to work with clang 3.4 and clang 3.3