Some changes to make it compile on Mac with clang
Merge pull request #2 from kintel/macport

Some changes to make it compile on Mac with clang