linux build fixes (thanks to seclorum)