fix compile error on gcc 4.7
add a .gitignore file