Allow building with gcc-4.6, gcc-4.7 and clang