Apply patch (requested by mrg in ticket 1935):
Fix build.