Fixing some build problems