fixes for compiling on Linux
Merge pull request #872 from dsyme/linux-fixes-1

fixes for compiling on Linux