Fix for deprecated moment.js date constructor.

See https://github.com/moment/moment/issues/1407