Build fix for NetBSD 6.1. From Edgar Fuß in PR 49334.
Reported upstream as https://bugs.linuxfoundation.org/show_bug.cgi?id=1235