made motion detect compatible with opencv 2.3 too