Update Makefile.am accordingly
Make mot-encoder C++, removes memory leaks