Fixes to allow GCC4.8 building

Signed-off-by: Daniel Tarrant <daniel.g.tarrant@gmail.com>