Updated the time_ago_in_words function to be compliant with JsLint