I have created an upstream pull request to fix the issue: https://github.com/oetiker/rrdtool-1.x/pull/1255