fixes so that it will compile on linux (gcc v4.9.0, arch linux 3.15.3-1-ARCH)