Fixes to compile with stricter g++-4.9 checks

Not sure if these are 4.9 specific or apply to 4.8 as well (compiled on Ubuntu 14.10)