Fixed module so it works in NodeJs. Also tidied up some jshint errors

Hi

I fixed the module so it works in nodejs. This fixes the issue here: https://github.com/luisfarzati/moment-interval/issues/3