Fixing some porting issues. I should tell the world that most of this
repository is for testing and it should not be used for real things :)