This uses snprintf instead of strlcpy to make it build on ChromeOS.
mentioned in commit 71da02e8
mentioned in commit c2884b7c