Fixed moment.js saying Date is not a valid date

Calling moment.js ctor on a Date object with formatting argument makes it invalid.
Merge pull request #390 from rgripper/patch-1

Fixed moment.js treating Date as an invalid date