simple implementation of adler32 checksum