Fix Measurer.toJSON to work when there is no protractor.

Test Plan:
Score a Measurer question successfully in test.html with protractor hidden.

Auditors: jack