build fixes

Hi, I'm using GCC 4.8.1 on Arch linux; these fix a couple of build issues I encountered.