Patch from Jonathan Rice: meanwhile doesn't build correctly with clang.