Implement strnlen.