some fixes for unix

Some first fixes to get this project to compile on Unix.