Fixing linker errors on gcc 4.8