Even after applying your patch I had a little trouble getting everything to link properly on x86_64 Fedora (14). I ended up manually tweaking my make files after running qmake.
Changed the LIBS line (in MLDemos/Makefile, _AlgorithmPlugins/<n>/Makefile.<n>, _IOPlugins/<n>/Makefile.<n>) to:
Changed the LIBS line (in MLDemos/Makefile, _AlgorithmPlugins/<n>/Makefile.<n>, _IOPlugins/<n>/Makefile.<n>) to:
LIBS = $(SUBLIBS) -L/usr/lib64 -L/usr/local/lib -lhighgui -lcv -lcxcore -lQtGui -lQtCore -lpthread
I suspect there's an easier way, but this at least allowed me to build and everything seems to work properly.