Fix build with clang, patch submitted by jkim@