json fogMode may be null

This is a better cross-platform fix, the previous fix gave compiler errors on c++ targets.
Merge pull request #5 from labe-me/patch-2

json fogMode may be null