Various build fixes:

Fix more mismerges and building with gcc 4.9.1

Signed-off-by: Paul Beeler <pbeeler80@gmail.com>