add support for gcc(<4.8.1) and clang(<3.1)