add version check for compiling in debian/wheezy with opencv 2.3.1
type casting required by compiling for Octave
modify Makefile for compiling for mex/octave interface using mkoctfile --mex