From Mike Krus, compile fix to enable compiling across a wider set of versions.