fix the checksum() function for crypto API of node > v.10

this is for the issue 3, https://github.com/dshaw/checksum/issues/3