Use `longest` instead of `max`

This fixes issues with npm due to a stupid deeply nested dependency (https://gist.github.com/sindresorhus/accb44d6eff6cbc24984#file-gistfile1-txt-L20).