upgrade code to support moment 2.8.x