Fix compile errors on network <= 2.3
Add .gitignore