Two source code fixes, so the source builds better on Mac OS X. Some compilation problems remain but they need more looking into.
Merge pull request #27 from sgielen/macosx-build

Fix two FTBFS on Mac OS X