random buildfixes
Merge pull request #329 from linas/master

cherrypick random buildfixes from sandsmark