Fix issue #4 for JSON serialization with solutions having missing variables.