fix a few g++-4.8 warnings on linux