adapt to different compilers